/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("qx_mx_peijian",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using VOL.Entity.DomainModels;
using VOL.Miyao.IServices;
using Orther.BLL.Miyao;
using Orther.Model.param;
using Project.Utils;
using VOL.Core.Filters;
using Microsoft.AspNetCore.Authorization;

namespace VOL.Miyao.Controllers
{
    public partial class qx_mx_peijianController
    {
        private readonly Iqx_mx_peijianService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        private MxPeijianBLL mxPeijianBLL = new MxPeijianBLL();

        [ActivatorUtilitiesConstructor]
        public qx_mx_peijianController(
            Iqx_mx_peijianService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }

        [AllowAnonymous]
        //[ApiActionPermission(Core.Enums.ActionPermissionOptions.Search)]
        [HttpGet, Route("GetList")]
        public async Task<ActionResult> GetList(MxPeijianParam param, int? topNum)
        {
            TData<List<qx_mx_peijian>> obj = await mxPeijianBLL.GetList(param, topNum);
            return JsonNormal(obj);
        }

    }
}
